• The document outlines the offline user experience (UX) patterns for the Expensify app, emphasizing the importance of enabling users to interact with the app even when they are not connected to the internet. The primary goal is to ensure that users can perform as many actions as possible offline, which is crucial for maintaining productivity in environments with unstable internet connections. The document begins by discussing the motivation behind these patterns, highlighting the need for an optimistic approach to offline interactions. This means that the app can assume certain actions will succeed when the user is back online, allowing for a smoother user experience. For instance, when a user pins a chat, the app can immediately reflect this change in the user interface without waiting for the API request to complete, as the outcome is predictable. Several UX patterns are defined to guide developers in implementing offline functionality: 1. **None - No Offline Behavior**: This pattern applies when there is no interaction with the server. The feature operates normally or displays stale data until a connection is reestablished. 2. **A - Optimistic Without Feedback**: In this scenario, the app queues the request to be sent later and allows the user to continue as if the request succeeded. This is suitable for actions that do not require immediate server feedback. 3. **B - Optimistic With Feedback**: Similar to the previous pattern, but it provides visual feedback to the user that the request is pending. This is particularly useful for actions that the user should be aware are not yet completed. 4. **C - Blocking Form UI Pattern**: This pattern prevents form submission when offline, greying out the submit button while allowing users to fill out the form. The data is saved locally for later submission. 5. **D - Full Page Blocking UI Pattern**: This extreme measure blocks user interaction with an entire page when critical data cannot be fetched due to being offline or when an error occurs. It ensures that users do not see outdated or incorrect information. The document also includes a flowchart to help developers determine which UX pattern to apply based on specific questions about the feature's interaction with the server, the type of request being made, and whether the user needs to know the success of their action. Overall, the guidelines aim to create a seamless offline experience, allowing users to continue their tasks without interruption while ensuring that they are informed about the status of their actions. This approach not only enhances user satisfaction but also aligns with the app's mission to support users in various environments.